<!-- HTML header for doxygen 1.8.10-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="generator" content="Doxygen 1.8.10" />
    <title>ZRDDS: HistoryQosPolicyKind类 参考</title>
    <link href="tabs.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="jquery.js"></script>
    <script type="text/javascript" src="dynsections.js"></script>
    <link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
    <link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
    <link href="doxygen.css" rel="stylesheet" type="text/css" />
    <link href="customdoxygen.css" rel="stylesheet" type="text/css"/>
    <link href="static/css/bootstrap.css" rel="stylesheet" />
    <!-- <link href="static/css/sticky-footer-navbar.css" rel="stylesheet">
    <script type="text/javascript" src="static/js/bootstrap.js"></script> -->
    <script type="text/javascript" src="static/js/doxy-boot.js"></script>
</head>
<body>
    <div id="top">
        <!-- do not remove this div, it is closed by doxygen! -->
        <!-- end header part --><!-- 制作者 Doxygen 1.8.10 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'搜索');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>首页</span></a></li>
      <li><a href="pages.html"><span>相关页面</span></a></li>
      <li><a href="namespaces.html"><span>包</span></a></li>
      <li class="current"><a href="annotated.html"><span>类</span></a></li>
      <li><a href="examples.html"><span>示例</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="搜索" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>类列表</span></a></li>
      <li><a href="classes.html"><span>类索引</span></a></li>
      <li><a href="hierarchy.html"><span>类继承关系</span></a></li>
      <li><a href="functions.html"><span>类成员</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('classcom_1_1zrdds_1_1infrastructure_1_1_history_qos_policy_kind.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-static-attribs">静态 Public 属性</a> &#124;
<a href="classcom_1_1zrdds_1_1infrastructure_1_1_history_qos_policy_kind-members.html">所有成员列表</a>  </div>
  <div class="headertitle">
<div class="title">HistoryQosPolicyKind类 参考</div>  </div>
</div><!--header-->
<div class="contents">

<p>样本数据保存类型。  
 <a href="classcom_1_1zrdds_1_1infrastructure_1_1_history_qos_policy_kind.html#details">更多...</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-attribs"></a>
静态 Public 属性</h2></td></tr>
<tr class="memitem:ae8f8d874270b6d22cc6190512cc3715b"><td class="memItemLeft" align="right" valign="top">static final <a class="el" href="classcom_1_1zrdds_1_1infrastructure_1_1_history_qos_policy_kind.html">HistoryQosPolicyKind</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1zrdds_1_1infrastructure_1_1_history_qos_policy_kind.html#ae8f8d874270b6d22cc6190512cc3715b">KEEP_LAST_HISTORY_QOS</a> = new <a class="el" href="classcom_1_1zrdds_1_1infrastructure_1_1_history_qos_policy_kind.html">HistoryQosPolicyKind</a>(0)</td></tr>
<tr class="memdesc:ae8f8d874270b6d22cc6190512cc3715b"><td class="mdescLeft">&#160;</td><td class="mdescRight">保存最新样本数据类型。  <a href="#ae8f8d874270b6d22cc6190512cc3715b">更多...</a><br /></td></tr>
<tr class="separator:ae8f8d874270b6d22cc6190512cc3715b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a74577cf78de2e38cb7955748a1f7b150"><td class="memItemLeft" align="right" valign="top">static final <a class="el" href="classcom_1_1zrdds_1_1infrastructure_1_1_history_qos_policy_kind.html">HistoryQosPolicyKind</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1zrdds_1_1infrastructure_1_1_history_qos_policy_kind.html#a74577cf78de2e38cb7955748a1f7b150">KEEP_ALL_HISTORY_QOS</a> = new <a class="el" href="classcom_1_1zrdds_1_1infrastructure_1_1_history_qos_policy_kind.html">HistoryQosPolicyKind</a>(1)</td></tr>
<tr class="memdesc:a74577cf78de2e38cb7955748a1f7b150"><td class="mdescLeft">&#160;</td><td class="mdescRight">尝试保存所有样本数据类型。  <a href="#a74577cf78de2e38cb7955748a1f7b150">更多...</a><br /></td></tr>
<tr class="separator:a74577cf78de2e38cb7955748a1f7b150"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">详细描述</h2>
<div class="textblock"><p>样本数据保存类型。 </p>
</div><h2 class="groupheader">类成员变量说明</h2>
<a class="anchor" id="a74577cf78de2e38cb7955748a1f7b150"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">final <a class="el" href="classcom_1_1zrdds_1_1infrastructure_1_1_history_qos_policy_kind.html">HistoryQosPolicyKind</a> KEEP_ALL_HISTORY_QOS = new <a class="el" href="classcom_1_1zrdds_1_1infrastructure_1_1_history_qos_policy_kind.html">HistoryQosPolicyKind</a>(1)</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>尝试保存所有样本数据类型。 </p>
<p>以上描述中使用“尝试”一词是因为实际保存的数量受限于 DDS_ResourceLimitsQosPolicy 否则设置为该保存类型 将导致内存资源耗尽，设置为该类型时， DDS_HistoryQosPolicy.depth 成员无效。</p>
<p>设置为该类型的数据写者的可靠性表现如下：</p><ul>
<li>当队列中一个数据实例下样本的数量 达到 DDS_ResourceLimitsQosPolicy.max_samples_per_instance 值 ；</li>
<li>如果最旧的数据样本已经被所有数据读者接收时，数据实例下新的样本会替换该实例在发送队列中最旧的样本。</li>
<li>如果实例下最旧的样本没有被所有数据读者接收时，尝试写入一个该数据实例下的新样本的 DataWriter.write 操作会产生阻塞（时间由 DDS_ReliabilityQosPolicy.max_blocking_time 决定）。</li>
</ul>
<p>设置为该类型的数据读者的可靠性表现如下：</p><ul>
<li>当队列中一个数据实例下样本的数量 达到 DDS_ResourceLimitsQosPolicy.max_samples_per_instance值 ；</li>
<li>该新的数据样本将被拒绝，此时数据读者的样本拒绝状态会被触发 （ DataReaderListener.on_sample_reject 以及 DataReader.get_sample_reject_status 获取状态）。 此时需要用户通过DataReader.take 系列方法腾出存储存储空间，使得新的样本能够提交给用户， 注意此时不会造成丢包，因为被拒绝的样本会通过重传等机制重新尝试提交给用户。 </li>
</ul>

</div>
</div>
<a class="anchor" id="ae8f8d874270b6d22cc6190512cc3715b"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">final <a class="el" href="classcom_1_1zrdds_1_1infrastructure_1_1_history_qos_policy_kind.html">HistoryQosPolicyKind</a> KEEP_LAST_HISTORY_QOS = new <a class="el" href="classcom_1_1zrdds_1_1infrastructure_1_1_history_qos_policy_kind.html">HistoryQosPolicyKind</a>(0)</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>保存最新样本数据类型。 </p>
<p>该类型为默认类型。这种情况下，ZRDDS会尝试为每个实例保存最新的样本，当样本的数量达到 DDS_HistoryQosPolicy.depth 限制时， ZRDDS 会用最新的样本覆盖最旧的样本，当实体设置为该类型时，不能保证绝对的可靠。</p>
<p>设置为该类型的数据写者的可靠性表现如下：</p><ul>
<li>当队列中一个数据实例下样本的数量 达到 depth 值，该数据实例下新的样本会替换队列中该实例中最旧的样本；</li>
<li>此时如果被覆盖的数据样本未被匹配的数据读者接收，则会造成数据样本丢失，数据读者的样本丢失状态会被触发 （DataReaderListener.on_sample_lost 以及 DataReader.get_sample_lost_status获取状态）。</li>
</ul>
<p>设置为该类型的数据写者的可靠性表现如下：</p><ul>
<li>当队列中一个数据实例下样本的数量 达到 depth 值，该数据实例下新的样本会替换队列中该实例中最旧的样本；</li>
<li>此时如果被替换的样本未被用户通过 DataReader.read/take系列方法访问时，用户将会丢失被替换样本。 </li>
</ul>

</div>
</div>
<hr/>该类的文档由以下文件生成:<ul>
<li>HistoryQosPolicyKind.java</li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- HTML footer for doxygen 1.8.10-->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><b>com</b></li><li class="navelem"><b>zrdds</b></li><li class="navelem"><a class="el" href="namespacecom_1_1zrdds_1_1infrastructure.html">infrastructure</a></li><li class="navelem"><a class="el" href="classcom_1_1zrdds_1_1infrastructure_1_1_history_qos_policy_kind.html">HistoryQosPolicyKind</a></li>
    <li class="footer">
      <a href="http://www.zrtechnology.com">&copy; Copyright (c) 2018 ZhenRong Technology, Inc. All rights reserved.</a>
    </li>
  </ul>
</div>
</body>
</html>
